//
//  VCMember.swift
//  AirlineReservation
//
//  Created by Kevin on 2020/1/27.
//  Copyright © 2020 Kevin. All rights reserved.
//

import UIKit

class VCExpense: VCBase {
    
    private let titles = ["个人","企业"]
    
    // 布局
    private lazy var bodyInfomationView:ItemView = {
        let uiY = realHeight + MARGIN10
        let ui = ItemView(frame: CGRect(x: 0, y: uiY, width: SCREEN_WIDTH, height: MARGIN140), count: titles.count)
        ui.titleLabels = titles
        ui.backgroundColor = UIColor.white
        return ui
    }()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        init_views()
        init_event()
    }
}

extension VCExpense {
    
    private func init_event() -> Void  {
        bodyInfomationView.complete = {item in
            switch item {
            case 0:
                self.pushVcHideBottomBar(title: "个人报销", vc: VCPerson())
            case 1:
                self.pushVcHideBottomBar(title: "企业报销", vc: VCCompany())
            default:
                break
            }
        }
    }
    
    private func init_views() -> Void {
        view.addSubview(backroundWhite)
        view.addSubview(bodyInfomationView)
    }
}
